<template>
  <div>FormRulesExample</div>
    <dynamic-form :formConfig="formConfig" :formData="formData" :getRulesFun="getRulesFun" />

</template>
<script setup lang="ts">

import { formConfig } from './config'
import DynamicForm from '@/components/DynamicForm/DynamicForm.vue'
import { reactive } from 'vue'
import type { FormData } from '@/components/DynamicForm/type'
import { RulesUtil } from '../../core/rulesUtil'
const formData = reactive<FormData>({})
function getRulesFun(ruleName) {
  if (ruleName) {
    return RulesUtil[ruleName]
  }
}

</script>
<style scoped>

</style>
